/**
* @filename:${entityName} ${createTime}
* @project ${project}  ${version}
* Copyright(c) 2018 ${author} Co. Ltd.
* All right reserved.
*/
package ${entityUrl};

import java.io.Serializable;

<#if entityLombokModel>
    import lombok.AllArgsConstructor;
    import lombok.Data;
    import lombok.NoArgsConstructor;
</#if>
    import BaseDBEntity.TableDescription;
     import io.swagger.annotations.ApiModelProperty;
<#list cis as ci>
    <#if ci.javaType=="Date" || ci.javaType=="LocalDateTime" >
        import java.util.Date;
        import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
        import org.springframework.format.annotation.DateTimeFormat;
        import com.fasterxml.jackson.annotation.JsonFormat;
        import  springmvc.common.CustomDateSerializer;
        <#break>
    </#if>
</#list>

/**
*
* @Description:  ${entityComment}
* @Author:       ${author}
* @CreateDate:   ${createTime}
* @Version:      ${version}
*
*/
<#if entityLombokModel>
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
</#if>
<#if keyFields??>
    @TableDescription(primaryKeyNames ={ "${keyFields}" },tableName = "${table}")
</#if>
    public class ${entityName} implements Serializable {
        private static final long serialVersionUID = ${agile}L;
        <#list cis as ci>
            <#if ci.javaType=="Date">
                @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
                @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
                @ApiModelProperty(name = "${ci.property}" , value = "${ci.comment}")
                private ${ci.javaType} ${ci.property};
                public ${ci.javaType} get${ci.property?cap_first}() {
                return ${ci.property};
                };
                @JsonDeserialize(using = CustomDateSerializer.class)
                public void set${ci.property?cap_first}(${ci.javaType} ${ci.property?uncap_first}) {
                this.${ci.property} = ${ci.property?uncap_first};
                }
            <#else>

                @ApiModelProperty(name = "${ci.property}" , value = "${ci.comment}")
                private ${ci.javaType} ${ci.property};
                <#if !entityLombokModel>
                    <#if ci.javaType == "boolean">
                        <#assign getprefix="is"/>
                    <#else>
                        <#assign getprefix="get"/>
                    </#if>
                    public ${ci.javaType} ${getprefix}${ci.property?cap_first}() {
                    return ${ci.property};
                    };
                    public void set${ci.property?cap_first}(${ci.javaType} ${ci.property?uncap_first}) {
                    this.${ci.property} = ${ci.property?uncap_first};
                    }
                </#if>

            </#if>


        </#list>
}
	